<? include_once("../../../common/common_setting_unit.php"); //引入通用的设置文件?>



<?

$del_old="delete from ".$table_Prefix."quotation_detail where case_nid='".$_REQUEST['ai_case_nid']."' and unit_nid = '".$_SESSION['nid']."'";
$query = mysql_query($del_old) or die ("error:".mysql_error());




$p['table']=$table_Prefix."quotation_detail";
$p['items']=array("case_nid","price","unit_nid","product_nid","unit_name");

foreach ($_REQUEST['ai_price'] as $k=>$v )
{
    if($v>0){
        $p['values'][]=array($_REQUEST['ai_case_nid'],$v,$_REQUEST['ai_unit_nid'],$k,$_REQUEST['ai_unit_name']);
    }
}

$_case_detail_str=insert_datas($p);
$query = mysql_query($_case_detail_str) or die ("error:".mysql_error());
mysql_close($con);

?>





<script type="text/javascript">
    alert("输入信息已保存，点击确认返回继续操作.");
    document.location.href = "../view/detail-info-quotation.php?nid=<? echo $_REQUEST['ai_case_nid']?>"
</script>




